// 著名的点
#include <iostream>
using namespace std;

class Point {
private:
    double x, y;

public:
    Point() {
        cout << "在Point构造函数中x = y = 0\n";
        x = 0.0;
        y = 0.0;
    }

    Point(double x, double y) {
        cout << "在Point构造函数中x = x1,  y = y1\n";
        this->x = x;
        this->y = y;
    }

    void ShowThePoint() {
        cout << "(" << x << ", " << y << ")\n";
    }
};

class DataPoint : public Point {
public:
    DataPoint() {}
    DataPoint(double x, double y) : Point(x, y) {}
};

int main() {
    cout << "欢迎使用著名的点程序\n";
    DataPoint p1;
    DataPoint p2(10, 12);

    cout << "点1是: ";
    p1.ShowThePoint();

    cout << "点2是: ";
    p2.ShowThePoint();

    cout << "程序的工作方式很好\n";
}